<div id="goods_exshow_config" class="tableform">
    <div class="division">
        <p>
            <label for="">最多展示数量：</label>
            <{input type="text" name="limit" value=$setting.limit size="3"}>个商品
        </p>
        <p>
            <label>价格显示标签：</label>
            <{input type="text" name="texttag" vtype="required" value=$setting.texttag|default:"抢购价"}>
        </p>
        <p>
            <label>　显示市场价：</label>
            <input type="radio" name="show_market" vtype="requiredradio" value="true" <{if $setting.show_market!="false"}>checked<{/if}>> 是
            <input type="radio" name="show_market" value="false" <{if $setting.show_market=="false"}>checked<{/if}>> 否
        </p>
        <p>
            <label>显示商品评分：</label>
            <input type="radio" name="show_star" vtype="requiredradio" value="true" <{if $setting.show_star=="true"}>checked<{/if}>> 是
            <input type="radio" name="show_star" value="false" <{if $setting.show_star!="true"}>checked<{/if}>> 否
        </p>
    </div>
    <div class="division">
        <div class="goods-selector-handle clearfix">
            <div class="span-auto">
                <label>
                    <input type="radio"  name="selector" value="filter" <{if $setting.selector=="filter"}>checked<{/if}> />&nbsp;范围选择商品
                </label>
            </div>
            <div class="span-auto">
                <label><input type="radio"  name="selector" value="select" <{if $setting.selector=="select"}>checked<{/if}> />&nbsp;精确选择商品</label>
            </div>
        </div>
        <div class="division goods-selector">
            <div data-extend = "filter" <{if $setting.selector=="select"}>style="display:none"<{/if}>> 
                <{input type="goodsfilter"  name="goods_filter"  value=$setting.goods_filter}>
                <div class="division">
                    排序规则：
                    <select  name="goods_order_by">
                        <{foreach from=$data.goods_order_by item=item}>
                        <option value="<{$item.condition}>"  <{if $setting.goods_order_by == $item.condition}>selected<{/if}>><{$item.label}></option>
                        <{/foreach}>
                    </select>
                </div>
            </div>
            <div data-extend = "select" <{if $setting.selector=="filter"}>style="display:none;"<{/if}>>
                <{input type="goods_select" 
                object="goods@b2c" 
                pdt_name="goods_select" 
                pdt_value=$setting.goods_select 
                obj_name="goods_select_linkobj"  
                obj_value=$setting.goods_select_linkobj  
                breakpoint=0
                }>
            </div>

        </div>
    </div>
</div>
<script>
    $$('#goods_exshow_config .goods-selector-handle input[type=radio]').addEvent('change',function(){
        var radio  = this;
        if(!radio.checked)return;
        $$('#goods_exshow_config .goods-selector [data-extend]').each(function(item){

            if(item.get('data-extend')!=radio.value){
                item.hide();
                }else{
                item.show();
            }

        });

    });
</script>
